package com.exam.classes.service;

import com.exam.classes.mapper.StudentMapper;
import com.exam.classes.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName : StudentService
 * @Description :
 * @Author : WHB
 */

@Service
public class StudentService {
    @Autowired
    private StudentMapper studentMapper;

    /**
     * 加入班级
     * @param sid
     * @param classId
     */
    public void joinClasses(Long sid, int classId) {

        Student student = new Student();
        student.setSid(sid);
        student.setClassId(classId);
        studentMapper.insert(student);
    }
}
